package Zhouliu;
public class Math {
    public int  num;
    public int getNum() {
        return num;
    }
    public void setNum(int num) {
        this.num = num;
    }
    public void print(int num){
        if(num>=000&&num<=999){
            //求百位
            int a=num/100;
            //求十位
            int b=(num/10)%10;
            //求个位
            int c=num%10;
            int temp=0;
            temp=c;
           c=a;
           a=temp;
            System.out.println("该数为:"+a+""+b+""+c);
        }else{
            System.out.println("该数不是三位数，输入有误，请重新输入");
        }
    }
}
